﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserManage.aspx.cs" Inherits="WebSystem.User.UserManage" Theme="normal" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>管理员信息管理</title>

    <script language="javascript" type="text/javascript">
            function SelectAllCheckboxes(spanChk)
	        {
		        // Added as ASPX uses SPAN for checkbox
		        var xState=spanChk.checked;

		        elm = spanChk.form.elements;
		        for(i = 0; i < elm.length; i++)
		        {
			        if(elm[i].type == "checkbox" && elm[i].id != spanChk.id)
			        {
				        //elm[i].click();
				        if(elm[i].checked!=xState)
					        elm[i].click();	//elm[i].checked=xState;
			        }
		        }
	        }
    </script>

</head>
<body style="background-color:#fcf6ec">
    <form id="form1" runat="server">
        <!--标题-->
        <%--<div class="normalnav">
            <div class="normalcontent">
                用户管理>>>管理员信息管理</div>
        </div>--%>
        <div class="normalnav">
            <div class="normalcontent">
                <span style="color: #ffffff">用户管理>>></span><span style="color: #f6ff00">管理员信息管理</span>
            </div>
        </div>
        
        <!--功能按钮-->
        <div class="normalmenu1" style="position: absolute; z-index: 100;">
            <div class="normalmenucontent" style="padding-left:10px;">
               
                &nbsp;&nbsp;&nbsp;搜索项:&nbsp;
                <asp:DropDownList ID="DDLTemplate" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DDLTemplate_SelectedIndexChanged">
                </asp:DropDownList>
                <asp:TextBox ID="txtPropasal" runat="server" Font-Size="14px" Width="123px" MaxLength="20"></asp:TextBox>
                <asp:ImageButton ID="ibtnsearch" runat="server" ImageUrl="../Images/Basic/chaxun.gif"
                    OnClick="butlookout_Click" />查询
                &nbsp; &nbsp;<font style="color: #426F98; font-family: 宋体; font-size: 12px">注：为空则查询所有</font>
                <br />
                 &nbsp;&nbsp;&nbsp;
                <asp:CheckBox ID="ChkAll" runat="server" Text="全选" onclick="javascript:SelectAllCheckboxes(this)"
                    Font-Size="14px" />
                <asp:ImageButton ID="butDelete" runat="server" ImageUrl="../Images/Basic/shanchu.gif"
                    OnClick="butDelete_Click" CausesValidation="False" ToolTip="删除" />删除
                <asp:ImageButton ID="btnAddUser" runat="server" ImageUrl="../Images/Basic/tianjia.gif"
                    CausesValidation="False" ToolTip="新增" OnClick="btnAddUser_Click" />新增
                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="../Images/Basic/weichayuejianli.gif"
                     CausesValidation="False" ToolTip="重置密码" OnClick="ImageButton1_Click" /> 重置密码
            </div>
        </div>
        
        <!--列表-->              
          <div class="normalgrid1" style="left:10px;">              
            <asp:GridView ID="gvitem" runat="server" Width="99%" OnRowCommand="gvitem_RowCommand"
                SkinID="normal" OnPageIndexChanging="gvitem_PageIndexChanging" OnRowCreated="gvitem_RowCreated"
                EmptyDataText="暂无" OnRowDataBound="gvitem_RowDataBound">
                <Columns>
                    <asp:TemplateField HeaderText="序号" Visible="False">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="LblID" Text='<%# DataBinder.Eval(Container.DataItem,"US_UserID") %>' />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="选择">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkSelect" runat="server" AutoPostBack="false" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                        <HeaderStyle HorizontalAlign="Center" Width="5%"/>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="管理员帐号">
                        <ItemTemplate>
                            <a title='<%#DataBinder.Eval(Container.DataItem, "US_UserName") %>的详细信息' href='UserEdit.aspx?UserID=<%# DataBinder.Eval(Container.DataItem,"US_UserID") %>'>
                                <%# Cisoft.IntegrationSystem.Common.Function.cutString(DataBinder.Eval(Container.DataItem, "US_UserName").ToString(), 18)%>
                            </a>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left" Width="20%" />
                        <HeaderStyle HorizontalAlign="Center" Width="20%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="真实姓名">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="LblRealname" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left" Width="25%" />
                        <HeaderStyle HorizontalAlign="Center" Width="25%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="角色">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="LblUserGroup" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left" Width="20%" />
                        <HeaderStyle HorizontalAlign="Center" Width="20%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="创建时间">
                        <ItemTemplate>
                            <%--<asp:Label runat="server" ID="lblSubDatetime">
                                <%# DataBinder.Eval(Container.DataItem, "US_ApplyDate")%>
                            </asp:Label>--%>
                            <asp:Label runat="server" ID="lblSubDatetime" Text='<%# Eval("US_ApplyDate") %>' />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left" Width="20%" />
                        <HeaderStyle HorizontalAlign="Center" Width="20%" />
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <a title='修改' href='UserEdit.aspx?UserID=<%# DataBinder.Eval(Container.DataItem,"US_UserID") %>'>
                                修改
                            </a>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                        <HeaderStyle Width="10%" />
                    </asp:TemplateField>
                </Columns>
                <PagerSettings Visible="False" />
            </asp:GridView>
          </div>
          
          <!--分页按钮-->
        <div class="normalpager" id="div_pager" runat="server" >
            <asp:LinkButton ID="btnFirst" OnClick="PagerButtonClick" runat="server" CommandArgument="0"
                CausesValidation="False">最首页</asp:LinkButton>&nbsp;
            <asp:LinkButton ID="btnPrev" OnClick="PagerButtonClick" runat="server" CommandArgument="prev"
                CausesValidation="False">前一页</asp:LinkButton>&nbsp;
            <asp:Label ID="lblCurrentIndex" runat="server"></asp:Label>&nbsp;/&nbsp;
            <asp:Label ID="lblPageCount" runat="server"></asp:Label>
            <asp:LinkButton ID="btnNext" OnClick="PagerButtonClick" runat="server" CommandArgument="next"
                CausesValidation="False">后一页</asp:LinkButton>&nbsp;
            <asp:LinkButton ID="btnLast" OnClick="PagerButtonClick" runat="server" CommandArgument="last"
                CausesValidation="False">最后页</asp:LinkButton>
        </div>
    </form>
</body>
</html>
